home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / g / gnu_c / make368b.zoo / make / src / Makefile < prev   
Encoding:
Makefile  |  1993-09-18  |  9.4 KB  |  279 lines

  1. # NOTE: If you have no `make' program at all to process this makefile, run
  2. # `build.sh' instead.
  3. #
  4. # Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
  5. # This file is part of GNU Make.
  6. # GNU Make is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # GNU Make is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15. # You should have received a copy of the GNU General Public License
  16. # along with GNU Make; see the file COPYING.  If not, write to
  17. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #
  20. #    Makefile for GNU Make
  21. #
  22.  
  23. # Ultrix 2.2 make doesn't expand the value of VPATH.
  24. VPATH = .
  25. srcdir = $(VPATH)
  26.  
  27. CC = gcc
  28.  
  29. CFLAGS = -O2 -fomit-frame-pointer -fstrength-reduce -finline-functions \
  30.          -mbaserel -mpcrel
  31. #CFLAGS =  -mbaserel -mpcrel
  32. LDFLAGS = -mbaserel
  33.  
  34. # Define these for your system as follows:
  35. #    -DNO_ARCHIVES        To disable `ar' archive support.
  36. #    -DNO_FLOAT        To avoid using floating-point numbers.
  37. #    -DENUM_BITFIELDS    If the compiler isn't GCC but groks enum foo:2.
  38. #                Some compilers apparently accept this
  39. #                without complaint but produce losing code,
  40. #                so beware.
  41. # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
  42. # See also `config.h'.
  43. defines = -DHAVE_CONFIG_H -DHAVE_DUP2 -DNO_ARCHIVES -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
  44.  
  45. # Which flavor of remote job execution support to use.
  46. # The code is found in `remote-$(REMOTE).c'.
  47. REMOTE = stub
  48.  
  49. # If you are using the GNU C library, or have the GNU getopt functions in
  50. # your C library, you can comment these out.
  51. GETOPT = getopt.o getopt1.o
  52. GETOPT_SRC = $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h
  53.  
  54. # If you are using the GNU C library, or have the GNU glob functions in
  55. # your C library, you can comment this out.  GNU make uses special hooks
  56. # into the glob functions to be more efficient (by using make's directory
  57. # cache for globbing), so you must use the GNU functions even if your
  58. # system's C library has the 1003.2 glob functions already.  Also, the glob
  59. # functions in the AIX and HPUX C libraries are said to be buggy.
  60. GLOB = glob/libglob.a
  61.  
  62. # If your system doesn't have alloca, or the one provided is bad, define this.
  63. ALLOCA = 
  64. ALLOCA_SRC = $(srcdir)/alloca.c
  65.  
  66. # If your system needs extra libraries loaded in, define them here.
  67. # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
  68. # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
  69. # alloca.c instead on those machines.
  70. LOADLIBES = 
  71.  
  72. # Any extra object files your system needs.
  73. extras = getloadavg.o
  74.  
  75. # Common prefix for machine-independent installed files.
  76. prefix = 
  77. # Common prefix for machine-dependent installed files.
  78. exec_prefix = $(prefix)
  79.  
  80. # Name under which to install GNU make.
  81. instname = make
  82. # Directory to install `make' in.
  83. bindir = $(exec_prefix)/bin
  84. # Directory to find libraries in for `-lXXX'.
  85. libdir = $(exec_prefix)/lib
  86. # Directory to search by default for included makefiles.
  87. includedir = $(prefix)/include
  88. # Directory to install the Info files in.
  89. infodir = $(prefix)/info
  90. # Directory to install the man page in.
  91. mandir = $(prefix)/man/man$(manext)
  92. # Number to put on the man page filename.
  93. manext = 1
  94.  
  95. # Whether or not make needs to be installed setgid.
  96. # The value should be either `true' or `false'.
  97. # On many systems, the getloadavg function (used to implement the `-l'
  98. # switch) will not work unless make is installed setgid kmem.
  99. install_setgid = false
  100. # Install make setgid to this group so it can read /dev/kmem.
  101. group = 
  102.  
  103. # Program to install `make'.
  104. INSTALL_PROGRAM = $(INSTALL)
  105. # Program to install the man page.
  106. INSTALL_DATA = $(INSTALL) -m 644
  107. # Generic install program.
  108. INSTALL = ./install -c
  109.  
  110. # Program to format Texinfo source into Info files.
  111. MAKEINFO = makeinfo
  112. # Program to format Texinfo source into DVI files.
  113. TEXI2DVI = texi2dvi
  114.  
  115. # Programs to make tags files.
  116. ETAGS = etags -tw
  117. CTAGS = ctags -tw
  118.  
  119. objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o    \
  120.        rule.o implicit.o default.o variable.o expand.o function.o    \
  121.        vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o    \
  122.        $(GLOB) $(GETOPT) $(ALLOCA) $(extras)
  123. srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c        \
  124.        $(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c        \
  125.        $(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c        \
  126.        $(srcdir)/rule.c $(srcdir)/implicit.c $(srcdir)/default.c    \
  127.        $(srcdir)/variable.c $(srcdir)/expand.c $(srcdir)/function.c    \
  128.        $(srcdir)/vpath.c $(srcdir)/version.c                \
  129.        $(srcdir)/remote-$(REMOTE).c                    \
  130.        $(srcdir)/ar.c $(srcdir)/arscan.c                \
  131.        $(srcdir)/signame.c $(srcdir)/signame.h $(GETOPT_SRC)        \
  132.        $(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/file.h        \
  133.        $(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h        \
  134.        $(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in
  135.  
  136.  
  137. .SUFFIXES:
  138. .SUFFIXES: .o .c .h .ps .dvi .info .texinfo
  139.  
  140. .PHONY: all check info dvi
  141. all: make
  142. check: # No tests.
  143. info: make.info
  144. dvi: make.dvi
  145.  
  146. make.info: make.texinfo
  147.     $(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info
  148.  
  149. make.dvi: make.texinfo
  150.     $(TEXI2DVI) $(srcdir)/make.texinfo
  151.  
  152. make.ps: make.dvi
  153.     dvi2ps make.dvi > make.ps
  154.  
  155. make: $(objs)
  156.     $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new
  157.     mv -f make.new make
  158.  
  159. # -I. is needed to find config.h in the build directory.
  160. .c.o:
  161.     $(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \
  162.           $(CFLAGS) $< $(OUTPUT_OPTION)
  163.  
  164. # For some losing Unix makes.
  165. SHELL = sh
  166. MAKE = make
  167.  
  168. glob/libglob.a: force
  169.     cd glob; $(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS) -I..' \
  170.              CPPFLAGS='$(CPPFLAGS) -DHAVE_CONFIG_H' \
  171.              libglob.a
  172. force:
  173.  
  174. tagsrcs = $(srcs) $(srcdir)/remote-*.c
  175. TAGS: $(tagsrcs)
  176.     $(ETAGS) $(tagsrcs)
  177. tags: $(tagsrcs)
  178.     $(CTAGS) $(tagsrcs)
  179.  
  180. .PHONY: install installdirs
  181. install: installdirs \
  182.      $(bindir)/$(instname) $(infodir)/make.info \
  183.      $(mandir)/$(instname).$(manext)
  184.  
  185. installdirs:
  186.     $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
  187.  
  188. $(bindir)/$(instname): make
  189.     $(INSTALL_PROGRAM) make $@.new
  190.     @if $(install_setgid); then \
  191.        if chgrp $(group) $@.new && chmod g+s $@.new; then \
  192.          echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
  193.        else \
  194.          echo "$@ needs to be owned by group $(group) and setgid;"; \
  195.          echo "otherwise the \`-l' option will probably not work."; \
  196.          echo "You may need special priveleges to install $@."; \
  197.        fi; \
  198.      else true; fi
  199. # Some systems can't deal with renaming onto a running binary.
  200.     -rm -f $@.old
  201.     -mv $@ $@.old
  202.     mv $@.new $@
  203.  
  204. $(infodir)/make.info: make.info
  205.     if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
  206.     for file in $${dir}/make.info*; do \
  207.       name="`basename $$file`"; \
  208.       $(INSTALL_DATA) $$file \
  209.         `echo $@ | sed "s,make.info\$$,$$name,"`; \
  210.     done
  211. # Run install-info only if it exists.
  212. # Use `if' instead of just prepending `-' to the
  213. # line so we notice real errors from install-info.
  214.     if install-info --version >/dev/null 2>&1; then \
  215.       install-info --infodir=$(infodir) $$d/foo.info; \
  216.     else true; fi
  217.  
  218. $(mandir)/$(instname).$(manext): make.man
  219.     $(INSTALL_DATA) $(srcdir)/make.man $@
  220.  
  221. .PHONY: clean realclean distclean mostlyclean
  222. clean: glob-clean
  223.     -rm -f make *.o core
  224. distclean: clean glob-realclean
  225.     -rm -f Makefile config.h config.status build.sh stamp-config
  226.     -rm -f TAGS tags make.info* make.dvi
  227.     -rm -f make.?? make.??s make.log make.toc make.*aux
  228. realclean: distclean
  229. mostlyclean: clean
  230.  
  231. .PHONY: glob-clean glob-realclean
  232. glob-clean glob-realclean:
  233.     cd glob; $(MAKE) $@
  234.  
  235. #Makefile: config.status $(srcdir)/Makefile.in
  236. #    $(SHELL) config.status
  237. #config.h: stamp-config ;
  238. #stamp-config: config.status $(srcdir)/config.h.in
  239. #    $(SHELL) config.status
  240. #    touch stamp-config
  241.  
  242. configure: configure.in
  243.     autoconf $(ACFLAGS)
  244. config.h.in: configure.in
  245.     autoheader $(ACFLAGS)
  246.  
  247. # This tells versions [3.59,3.63) of GNU make not to export all variables.
  248. .NOEXPORT:
  249.  
  250. # Automatically generated dependencies will be put at the end of the file.
  251.  
  252. # Automatically generated dependencies.
  253. commands.o : commands.c make.h config.h dep.h commands.h file.h variable.h \
  254.   job.h 
  255. job.o : job.c make.h config.h commands.h job.h file.h variable.h 
  256. dir.o : dir.c make.h config.h 
  257. file.o : file.c make.h config.h commands.h dep.h file.h variable.h 
  258. main.o : main.c make.h config.h commands.h dep.h file.h variable.h job.h \
  259.   getopt.h 
  260. read.o : read.c make.h config.h commands.h dep.h file.h variable.h glob/glob.h 
  261. remake.o : remake.c make.h config.h commands.h job.h dep.h file.h 
  262. rule.o : rule.c make.h config.h commands.h dep.h file.h variable.h rule.h 
  263. implicit.o : implicit.c make.h config.h rule.h dep.h file.h 
  264. default.o : default.c make.h config.h rule.h dep.h file.h commands.h variable.h 
  265. variable.o : variable.c make.h config.h commands.h variable.h dep.h file.h 
  266. expand.o : expand.c make.h config.h commands.h file.h variable.h 
  267. function.o : function.c make.h config.h variable.h dep.h commands.h job.h 
  268. vpath.o : vpath.c make.h config.h file.h variable.h 
  269. version.o : version.c 
  270. ar.o : ar.c make.h config.h file.h dep.h 
  271. arscan.o : arscan.c make.h config.h 
  272. signame.o : signame.c config.h signame.h 
  273. remote-stub.o : remote-stub.c make.h config.h commands.h 
  274. getopt.o : getopt.c config.h getopt.h 
  275. getopt1.o : getopt1.c config.h getopt.h 
  276. getloadavg.o : getloadavg.c config.h 
  277.